

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>agpy &mdash; agpy 0.1.2 documentation</title>
    
    <link rel="stylesheet" href="../_static/extra.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '0.1.2',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="agpy 0.1.2 documentation" href="../index.html" />
    <link rel="up" title="Module code" href="index.html" />
     
    <script type="text/javascript">

      var _gaq = _gaq || [];
      _gaq.push(['_setDomainName', 'pyspeckit.bitbucket.org']);
      _gaq.push(['_setAllowHash', false]);
      _gaq.push(['_trackPageview']);


    </script>
    <link rel="stylesheet" type="text/css" href="../_static/extra.css" />
  </head>
  <body>
    <div class="header-wrapper">
      <div class="header">
        <h1><a href="../index.html">agpy 0.1.2 documentation</a></h1>
        <div class="rel">
          <a href="http://agpy.googlecode.com">agpy Home </a>  |
          <a href=../index.html>Docs Home </a>  |
          <a href="http://code.google.com/p/agpy/w/list">Wiki</a>  |
          <a href=../search.html>Search </a>
        </div>
       </div>
    </div>

    <div class="content-wrapper">
      <div class="content">
        <div class="document">
            
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <h1>Source code for agpy</h1><div class="highlight"><pre>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd">====</span>
<span class="sd">agpy</span>
<span class="sd">====</span>

<span class="sd">The functions included below are the &#39;mature&#39; codes from the agpy package.</span>

<span class="sd">.. moduleauthor:: Adam Ginsburg &lt;adam.g.ginsburg@gmail.com&gt;</span>

<span class="sd">&quot;&quot;&quot;</span>
<span class="n">__version__</span><span class="o">=</span><span class="s">&#39;0.1.2&#39;</span>
<span class="c">##from luminosity import luminosity</span>
<span class="c">#import readcol as readcol_mod</span>
<span class="kn">from</span> <span class="nn">readcol</span> <span class="kn">import</span> <span class="n">readcol</span>
<span class="c">##from UCHIIfitter import HIIregion</span>
<span class="kn">import</span> <span class="nn">gaussfitter</span>
<span class="kn">from</span> <span class="nn">gaussfitter</span> <span class="kn">import</span> <span class="n">moments</span><span class="p">,</span><span class="n">twodgaussian</span><span class="p">,</span><span class="n">gaussfit</span><span class="p">,</span><span class="n">onedgaussian</span><span class="p">,</span><span class="n">onedgaussfit</span>
<span class="c">#import kdist</span>
<span class="kn">from</span> <span class="nn">kdist</span> <span class="kn">import</span> <span class="n">kdist</span><span class="p">,</span><span class="n">vector_kdist</span>
<span class="c">#from plfit import plfit</span>
<span class="kn">from</span> <span class="nn">reg_gal2cel</span> <span class="kn">import</span> <span class="n">gal2cel</span>
<span class="kn">from</span> <span class="nn">posang</span> <span class="kn">import</span> <span class="n">posang</span>
<span class="c">#import densitymap</span>
<span class="c">#import downsample as downsample_mod</span>
<span class="kn">from</span> <span class="nn">AG_image_tools</span> <span class="kn">import</span> <span class="n">downsample</span><span class="p">,</span><span class="n">downsample_cube</span>

<span class="c">#from asinh_norm import AsinhNorm</span>
<span class="c">#import showspec # imports matplotlib = BAD</span>
<span class="kn">from</span> <span class="nn">contributed</span> <span class="kn">import</span> <span class="n">parallel_map</span>
<span class="kn">from</span> <span class="nn">timer</span> <span class="kn">import</span> <span class="n">print_timing</span>
<span class="kn">from</span> <span class="nn">region_photometry</span> <span class="kn">import</span> <span class="n">region_photometry</span>
<span class="kn">from</span> <span class="nn">region_photometry_files</span> <span class="kn">import</span> <span class="n">region_photometry_files</span>
<span class="kn">from</span> <span class="nn">PCA_tools</span> <span class="kn">import</span> <span class="n">efuncs</span><span class="p">,</span><span class="n">pca_subtract</span><span class="p">,</span><span class="n">unpca_subtract</span><span class="p">,</span><span class="n">smooth_waterfall</span>
<span class="kn">import</span> <span class="nn">constants</span>
<span class="kn">import</span> <span class="nn">blackbody</span>

<span class="kn">import</span> <span class="nn">AG_fft_tools</span>
<span class="kn">from</span> <span class="nn">AG_fft_tools</span> <span class="kn">import</span> <span class="o">*</span>

<span class="kn">import</span> <span class="nn">AG_image_tools</span>
<span class="kn">from</span> <span class="nn">AG_image_tools</span> <span class="kn">import</span> <span class="o">*</span>

<span class="kn">import</span> <span class="nn">cutout</span>
<span class="kn">import</span> <span class="nn">get_cutouts</span>

<span class="c"># import all of the functions but not the modules...</span>
<span class="n">__all__</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;readcol&#39;</span><span class="p">,</span> <span class="s">&#39;gaussfitter&#39;</span><span class="p">,</span> <span class="s">&#39;kdist&#39;</span><span class="p">,</span> <span class="s">&#39;reg_gal2cel&#39;</span><span class="p">,</span> <span class="s">&#39;posang&#39;</span><span class="p">,</span>
    <span class="s">&#39;densitymap&#39;</span><span class="p">,</span> <span class="s">&#39;downsample&#39;</span><span class="p">,</span> <span class="s">&#39;correlate2d&#39;</span><span class="p">,</span> <span class="s">&#39;psds&#39;</span><span class="p">,</span> <span class="s">&#39;convolve&#39;</span><span class="p">,</span> <span class="s">&#39;radialprofile&#39;</span><span class="p">,</span>
    <span class="s">&#39;constants&#39;</span> <span class="s">&#39;gal2cel&#39;</span><span class="p">,</span> <span class="s">&#39;convolve&#39;</span><span class="p">,</span> <span class="s">&#39;smooth&#39;</span><span class="p">,</span> <span class="s">&#39;azimuthalAverage&#39;</span><span class="p">,</span>
    <span class="s">&#39;azimuthalAverageBins&#39;</span><span class="p">,</span> <span class="s">&#39;kdist&#39;</span><span class="p">,</span> <span class="s">&#39;vector_kdist&#39;</span><span class="p">,</span> <span class="s">&#39;moments&#39;</span><span class="p">,</span> <span class="s">&#39;twodgaussian&#39;</span><span class="p">,</span>
    <span class="s">&#39;gaussfit&#39;</span><span class="p">,</span> <span class="s">&#39;onedgaussian&#39;</span><span class="p">,</span> <span class="s">&#39;onedgaussfit&#39;</span><span class="p">]</span>
</pre></div>

          </div>
        </div>
      </div>
        </div>
        <div class="sidebar">
          <h3>Table Of Contents</h3>
          <ul>
<li class="toctree-l1"><a class="reference internal" href="../agpy.html">Adam Ginsburg&#8217;s Python Code (agpy)</a></li>
<li class="toctree-l1"><a class="reference internal" href="../image_tools.html">Image Tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="../fft_tools.html">AG_fft_tools Package</a></li>
<li class="toctree-l1"><a class="reference internal" href="../plfit.html">plfit Package</a></li>
</ul>

          <h3 style="margin-top: 1.5em;">Search</h3>
          <form class="search" action="../search.html" method="get">
            <input type="text" name="q" />
            <input type="submit" value="Go" />
            <input type="hidden" name="check_keywords" value="yes" />
            <input type="hidden" name="area" value="default" />
          </form>
          <p class="searchtip" style="font-size: 90%">
            Enter search terms or a module, class or function name.
          </p>
        </div>
        <div class="clearer"></div>
      </div>
    </div>

    <div class="footer">
      &copy; Copyright 2011, Adam Ginsburg.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.2pre.
    <script type="text/javascript">

      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-6253248-2']);
      _gaq.push(['_trackPageview']);

      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();

    </script>
        
    </div>
  </body>
</html>